using ArticleManagementSystem.Api.Entity;
using Microsoft.EntityFrameworkCore;

namespace ArticleManagementSystem.Api.Db
{
    public class DataBase:DbContext
    {
        public DataBase(){

        }
        public DataBase (DbContextOptions options) : base (options){
            
        }
        public DbSet<Admin> admin {get;set;}
        public DbSet<Article> article {get;set;}
        public DbSet<AuditInfo> auditInfo {get;set;}
        public DbSet<Carousel> carousel {get;set;}
        public DbSet<Imgs> imgs {get;set;}
        public DbSet<Users> users {get;set;}
        public DbSet<Comment> Comments {get;set;}
        public DbSet<Recommend> Recommends {get;set;}
        public DbSet<Like> Like {get;set;}
        public DbSet<Pageviwes> Pageviwes {get;set;}

        protected override void OnConfiguring(DbContextOptionsBuilder options)
        {
            options.UseNpgsql(@"server=47.113.121.34;database=CMS;uid=postgres;pwd=XiongYY200012152841735357***;");
        }
    }
}